package mz.matafe.bolao

abstract class BolaoController {

    def authenticateService

    /** Get the logged in user. */
    protected User getUser(){
        authenticateService.userDomain()
    }

    /** Check if logged in. */
    protected boolean isUserLoggedIn() {
        authenticateService.isLoggedIn()
    }

    /**
     * TODO: call the taglib direct
     * Check if any role are granted
     */
    protected boolean ifAnyGranted(role) {
        authenticateService.ifAnyGranted(role)
    }
    
}
